/*
 * @Author: zyp yangpeng.zhang@fts.aero
 * @Date: 2024-06-11 15:30:04
 * @LastEditors: zyp yangpeng.zhang@fts.aero
 * @LastEditTime: 2024-06-28 10:15:18
 * @FilePath: \vue3-dynamic-module\src\router\route.async.ts
 * @Description: 程式描述
 */
// 需要鉴权的业务路由
import { RouteRecordRaw } from 'vue-router';
import Layout from '@/layout/index.vue';

const asyncRoutes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: () => import('@/views/home/index.vue'),
    meta: { title: '主页', icon: '', },
    name: 'Home'
  },
  {
    path: '/module',
    component: Layout,
    meta: { title: '模块', icon: '', },
    name: 'Module',
    children: []
  },
  {
    path: '/movie',
    component: Layout,
    meta: { title: '模块', icon: '', },
    name: 'Module',
    children: [
      {
        path: '',
        component: () => import('@/modules/Movie/index.vue'),
        meta: { title: '模块', icon: '', },
        name: 'Module',
      }
    ]
  },
];

export default asyncRoutes;
